import { createStore, combineReducers } from "redux";
import homeReducer from "./reducers/homeReducer";
import newsReducer from "./reducers/newsReducer";
import aboutReducer from "./reducers/aboutReducer";
import loginReducer from "./reducers/loginReducer";

//  combineReducers合并多个reducer，这样的好处是每一个都有对应状态目录
const reducers = combineReducers({
  home: homeReducer,
  news: newsReducer,
  about: aboutReducer,
  loginReducer
});
// console.log(reducers);
export default createStore(reducers);
